package polymorphic.Class.classInterface;

interface Person {
    String getName();

    default void run() {
        System.out.println(getName());
    }
}

class Student implements Person {
    private String name;

    public Student(String name) {
        this.name = name;
    }

    @Override
    public String getName() {
        return name;
    }
}

public class Demo01 {
    public static void main(String[] args) {
        Student student = new Student("John");
        student.run();
    }
}
